#ifndef FILECONTROL_H
#define FILECONTROL_H

#include "project.h"

void createModule (char name[], char id[], int value);
int getNumModules (void);

/*
 * returns 1 if there is an nth stdent and 0 if not.
 * Updates the student structure pointed to by student_ptr
 */
int getNthStudent(int index, student_t *student_ptr);

//Update grades array AND modules array
int getGrades (char id[]);

void createStudent ( char id[], char fname[], char lname[]);
int addGrades (char id[]);
int getStudent (char id[]);

extern char modules[MAX_NUM_MODULES][21];
extern int credits[MAX_NUM_MODULES];
extern int grades[MAX_NUM_MODULES];
extern char student_f_name[21];
extern char student_l_name[21];

int nextStudentExists(void);
student_t getNextStudent(void);


#endif

